package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbEventSource entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_EVENT_SOURCE", schema = "dbo", catalog = "AGDB")
public class TbEventSource implements java.io.Serializable {

	// Fields

	private String esId;
	private String esEventSource;
	private String a;
	private String b;
	private String c;
	private Set<TbEvent> tbEvents = new HashSet<TbEvent>(0);

	// Constructors

	/** default constructor */
	public TbEventSource() {
	}

	/** minimal constructor */
	public TbEventSource(String esId, String esEventSource) {
		this.esId = esId;
		this.esEventSource = esEventSource;
	}

	/** full constructor */
	public TbEventSource(String esId, String esEventSource, String a, String b,
			String c, Set<TbEvent> tbEvents) {
		this.esId = esId;
		this.esEventSource = esEventSource;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbEvents = tbEvents;
	}

	// Property accessors
	@Id
	@Column(name = "ES_ID", unique = true, nullable = false, length = 4)
	public String getEsId() {
		return this.esId;
	}

	public void setEsId(String esId) {
		this.esId = esId;
	}

	@Column(name = "ES_EVENT_SOURCE", nullable = false, length = 30)
	public String getEsEventSource() {
		return this.esEventSource;
	}

	public void setEsEventSource(String esEventSource) {
		this.esEventSource = esEventSource;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEventSource")
	public Set<TbEvent> getTbEvents() {
		return this.tbEvents;
	}

	public void setTbEvents(Set<TbEvent> tbEvents) {
		this.tbEvents = tbEvents;
	}

}